<%@ page language="java" isELIgnored="false"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <meta http-equiv="X-UA-Compatible" content="IE=8">
<link href="public/bootstrap.min.css" title="" rel="stylesheet" />
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="public/inspinia.css" />
<link title="" href="css/index.css" rel="stylesheet" type="text/css" />
<script src="public/jquery-1.11.3.js"></script>
<script src="public/bootstrap.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css"
	href="${request.getContext }/admin/css/xcConfirm.css" />
	<link rel="stylesheet" href="css/plugins/toastr/toastr.min.css" />
<title>测试系统</title>
<script src="js/index.js"></script>
<style>
th.prev {
	background: url(../img/dateleft.png) -3px !important;
}

th.next {
	background: url(../img/dateright.png) -10px !important;
}
</style>
</head>
<body style="overflow: hidden;">
	<div class="nav-style">
		<!--<div class="navbar-header">
				<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> 
			     	<span class="icon-bar"></span> 
			     	<span class="icon-bar"></span> 
			     	<span class="icon-bar"></span> 
			    </button>
				<a class="navbar-brand mystyle-brand"><span class="glyphicon glyphicon-home"></span></a>
			</div>-->
		<div class="">
			<div style="float: left;padding-top: 12px;margin-left: 20px;font-size: 20px;">测试系统</div>
			<ul id="cz_ul" class="nav_right_box pull-right">
				<!-- <li class="li-border"><a href="#" class="mystyle-color"><span
						class="fa fa-bell"></span> <span class="topbar-num">0</span> </a></li> -->
				<li class=" li-border"><a id="drop_menu"
					href="/admin/index"
					>掌讯科技<span class="caret"></span></a>
					<div class="user-menu">
						<span class="jiao"></span>
						<ul>
							<li id="xiuGai_pwd" data-toggle="modal" data-target="#myModal1"><a
								href="javascript:void(0)"> 修改密码</a></li>
							<li><a href="login.html">退出</a></li>
						</ul>
					</div></li>
			</ul>
			<ul id="a1" class="nav_guid pull-right">
					<li ${daoHangList.AuthorityType=="运营管理"?"class='active'":'' }><a
						href="/admin/index?moduleName=${daoHangList.AuthorityType }">
							<span class="title_top"></span> ${daoHangList.AuthorityType }
					</a></li>
			</ul>
		</div>
	</div>
	<div class="modal inmodal fade" id="myModal1" tabindex="-1"
		role="dialog" aria-hidden="true">
		<div class="modal-dialog modal-md">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span> <span class="sr-only">Close</span>
					</button>
					<h4 class="modal-title">修改密码</h4>
				</div>
				<div class="modal-body">
					<div class="form-group">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 control-label">
							输入原密码：</label>
						<div class="col-lg-9 col-md-9 col-sm-9">
							<input type="password" class="form-control" name="userPwd"/>
						</div>
					</div>
					<div class="form-group">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 control-label">
							输入新密码：</label>
						<div class="col-lg-9 col-md-9 col-sm-9">
							<input type="password" class="form-control" name="userPwd1"/>
						</div>
					</div>
					<div class="form-group">
						<label for="" class="col-lg-3 col-md-3 col-sm-3 control-label">
							确认新密码：</label>
						<div class="col-lg-9 col-md-9 col-sm-9">
							<input type="password" class="form-control" name="userPwd2"/>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-white" data-dismiss="modal">
						关闭</button>
					<button type="button" class="btn btn-primary" onclick="check()">确认修改</button>
				</div>
			</div>
		</div>
	</div>
	<div class="down-main">
		<div class="left-main left-full" style="z-index:101;overflow-y:auto;">
			<div class="sidebar-fold" >
				<span style="font-size: 15px;" class="fa fa-dedent"></span>
			</div>
			<div id="menu_box">
				<div id="grzm" class="subNavBox">
					<c:forEach items="${erList }" var="item">
						<div class="sBox">
							<div class="subNav sublist-up">
								<span class="title-icon fa fa-caret-right" ></span>
								<span  style=" float:left;margin-left:10px; display:inline-block;width:20px; margin-top:10px; height:20px;background:url(${request.getContext }/admin/newTemplate/img/ico.png) no-repeat 0 ${item.icoUrl }px"></span>
								<span  style=" float:left;margin-left:20px;" class="sublist-title">${item.AuthorityType }</span>
							</div>
							<ul class="navContent" style="display: none">
								<c:forEach items="${childList }" var="items">
									<c:if test="${item.AuthorityID==items.parentModuleID }">
										<li 
											<c:if test="${items.indexNo eq 1 && item.indexNo eq 1}"> class="active" </c:if>>
											<div class="showtitle" style="width: 100px;">
												<img src="img/leftimg.png" />${items.AuthorityType }
											</div> <a href="${items.moduleUrl}" ><!-- <span
												class="sublist-icon fa fa-user"></span> --><span
												class="sub-title" style="margin-left: 50px">${items.AuthorityType}</span> </a>
										</li>
									</c:if>
								</c:forEach>
							</ul>
						</div>
					</c:forEach>

				</div>
			</div>
		</div>
		<div class="right-product my-index right-full" style="z-index:102;">
			<iframe id="ifr" src="${url }" frameborder="no" scrolling="auto"
				width="100%" height="100%" allowtransparency="true"></iframe>
		</div>
	</div>
	<script src="${request.getContext }/admin/js/xcConfirm.js"
		type="text/javascript" charset="utf-8"></script>
		<script src="js/plugins/toastr/toastr.min.js"></script>
	<script src="js/new_page.js"></script>
	<script>
	$('#cz_ul>li:last-child').mouseover(function() {
		$(this).find('.user-menu').css('display', 'block');
	});
	$('#cz_ul>li:last-child').mouseleave(function() {
		$(this).find('.user-menu').css('display', 'none');
	});
		$('#xiuGai_pwd').click(function() {
			$(this).parent().parent().css('display', 'none');
		})
		function check(){
			var i=0;
			var userPwd = document.getElementsByName("userPwd")[0].value;
			var userPwd1 = document.getElementsByName("userPwd1")[0].value;
			var userPwd2 = document.getElementsByName("userPwd2")[0].value;
			
			if(userPwd==""){
				alertNew("请输入旧密码",false);
			}else if(userPwd1==""){
				alertNew("请输入新密码",false);
			}else if(userPwd2==""){
				alertNew("请再次输入新密码",false);
			}else if(userPwd1!=userPwd2){
				alertNew("新密码不一致！",false);
			}else{
				$.ajax({
					type : "post",
					url : "/admin/user/password",
					data : {
						"userPwd" : userPwd ,"userPwd1":userPwd1
					},
					dataType : "json",
					success:function(data) {
						window.wxc.xcConfirm(data.message, window.wxc.xcConfirm.typeEnum.info,
 	   							{onOk:function(){ window.location.href="/admin/user/password"}}//在后台消除session靠拦截器返回登录页
 	   					)
					},
					error : function(data) {
						console.log()
						alert(data.message);
					}
				});
			}
			
	}
	</script>
</body>
</html>